package cupk;

import java.io.BufferedReader;
import java.io.IOException;

public class FileReader {
    public String read(String fileNameSrc){
        StringBuilder content = new StringBuilder();
        try(BufferedReader br = new BufferedReader(new java.io.FileReader(fileNameSrc))){
            String line;
            while((line = br.readLine()) != null){
                content.append(line);
                content.append(System.lineSeparator());
            }
        } catch(IOException e){
            e.printStackTrace();
        }
        System.out.println("原内容: " + content.toString());
        return content.toString();
    }
}
